﻿using System.Web.UI;
using System.ComponentModel;

namespace MyLib.Web.UI {
	/// <summary>
	/// 
	/// </summary>
	[Designer("System.Web.UI.Design.WebControls.PreviewControlDesigner, System.Design")]
	[ToolboxItem(false)]
	[ParseChildren(true)]
	public class ItemTemplateContent : Control, IDataItemContainer, INamingContainer {
		/// <summary>
		/// 
		/// </summary>
		public object DataItem {
			get;
			private set;
		}

		/// <summary>
		/// 
		/// </summary>
		public int DataItemIndex {
			get;
			private set;
		}

		/// <summary>
		/// 
		/// </summary>
		public int DisplayIndex {
			get;
			private set;
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="dataItem"></param>
		/// <param name="dataItemIndex"></param>
		/// <param name="displayIndex"></param>
		public ItemTemplateContent(object dataItem, int dataItemIndex, int displayIndex) {
			DataItem = dataItem;
			DataItemIndex = dataItemIndex;
			DisplayIndex = displayIndex;
		}
	} // end of TemplateContent.
}
